Skip to content

Conversation

@tahminator
Copy link
Owner

@tahminator tahminator commented Jan 13, 2026

594

Description of changes

  • Update create duel links in anticaption of Arsh's PR

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Not needed

@github-actions
Copy link
Contributor

Title

594: Update create duel links in anticaption of Arsh's PR


PR Type

Enhancement


Description

  • Redirects from create path to duel root

  • Aligns error redirects to new route

  • Updates empty-state redirects for duels


Diagram Walkthrough

flowchart LR
  A["Legacy redirect to /duel/create"] -- "updated" --> B["Unified redirect to /duel"]
  B -- "applied in" --> C["Duel.page.tsx"]
  B -- "applied in" --> D["DuelBody.tsx"]
Loading

File Walkthrough

Relevant files
Enhancement
Duel.page.tsx
Redirect DuelPage fallback to /duel                                           

js/src/app/duel/[lobbyCode]/Duel.page.tsx

  • Update ToastWithRedirect target to /duel.
  • Replace old /duel/create path usage.
+1/-1     
DuelBody.tsx
Standardize DuelBody redirects to /duel                                   

js/src/app/duel/_components/DuelBody.tsx

  • Standardize error and unauth redirects to /duel.
  • Replace all /duel/create occurrences.
+2/-2     

@github-actions
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

AC Alignment

Verify that redirecting to /duel (instead of /duel/create) correctly renders the party screen and supports observer vs playable modes per the acceptance criteria for /duel/current and /duel/{lobbyCode}.

if (!lobbyCode) {
  return (
    <ToastWithRedirect
      to={"/duel"}
      message={"Please join or create a party first."}
    />
Error Flow

Confirm that redirecting generic errors to /duel won’t trap users in a loop and that the party screen can recover and guide users to start or leave a duel as required by the task.

if (status === "error" || error) {
  return (
    <ToastWithRedirect
      to={"/duel"}
      message={"Hmm, something went wrong."}
    />
  );
Empty State

Ensure /duel route properly handles the “join or create a duel first” flow and clearly differentiates between observer (/duel/{lobbyCode}) and playable (/duel/current) states.

if (!data || !data.success) {
  return (
    <ToastWithRedirect
      to={"/duel"}
      message={"Please join or create a duel first."}
    />
  );

@github-actions
Copy link
Contributor

Overall Project 75.73% 🍏

There is no coverage information present for the Files changed

@tahminator tahminator force-pushed the 594-2 branch 2 times, most recently from 686e0ce to 4009ad5 Compare January 13, 2026 01:44
@github-actions
Copy link
Contributor

Overall Project 75.73% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link
Contributor

Overall Project 75.73% 🍏

There is no coverage information present for the Files changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants